<template>
  <div class="userInfo">
    <div class="left">
      <Avatar :src="userInfo.avatar" />
    </div>
    <div class="right">
      <div class="username">{{userInfo.username}}</div>
      <!-- <div class="item">{{userInfo.company}}</div> -->
      <div class="item">
        <span class="text">电话</span>
        {{userInfo.mobile}}
      </div>
      <div class="item">
        <span class="text">部门</span>
        {{userInfo.departmentTitle}}
      </div>
      <div class="item">
        <span class="text">余额</span>
        {{userInfo.wage}}
      </div>
      <div class="item" v-if="userInfo.type==1">
        <span class="text">部门余额</span>
        {{userInfo.systemLimitEdu}}
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  name: "",
  data() {
    return {};
  },
  computed: {
    ...mapState(["userInfo"]),
  },
};
</script>

<style lang="less" scoped>
.userInfo {
  padding: 75px;
  display: flex;
  align-items: center;
  margin: 40px auto;
  background: #f6f8fa;
  border-radius: 8px;
  width: 500px;
  .left {
    .ivu-avatar {
      width: 150px;
      height: 150px;
    }
  }
  .right {
    font-size: 14px;
    color: #333;
    text-align: left;
    margin-left:30px;
    .username {
      font-size: 18px;
      font-weight: bold;
    }
    .text {
      color: #666;
      padding-right:20px;
    }
    .item{
      margin-top:12px;
    }
  }
}
</style>